﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using WebApplication1.Models.Database;

namespace WebApplication1.Models
{
     public interface IUserService
    {
        /// <summary>
        /// 根据用户名，从数据库查询用户
        /// </summary>
        User GetUserByUserName(string userName);
        bool ExistUserByUserName(string userName);

        /// <summary>
        /// 插入新用户数据
        /// </summary>
        /// <param name="username"></param>
        /// <param name="email"></param>
        /// <param name="nickname"></param>
        /// <param name="password"></param>
        int AddNewUser(string username, string email, string nickname, string password);
    }
}
